package com.deng.springboot.demo.web.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author 邓力宾
 * @date 2020/3/1016:31
 * @Description: restful 接口返回对象
 */
@Data
@ApiModel("接口统一返回对象")
public class ResponseResult<T> {

    public ResponseResult(Integer code, String msg, T data){
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    public ResponseResult(){}
    @ApiModelProperty(value = "结果码", required = true)
    private Integer code; // 结果码
    @ApiModelProperty(value = "提示信息", required = false)
    private String msg; // 提示信息
    @ApiModelProperty(value = "结果数据", required = false)
    private T data; // 结果数据
}
